package com.its.cloud.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.its.cloud.entity.Payment;
import org.apache.ibatis.annotations.*;

/**
 * @author huguangjun
 * @className PaymentMapper
 * @date 2021/1/11
 * @desc 17:09
 */
@Mapper
public interface PaymentMapper extends BaseMapper<Payment> {


    @Insert("insert into payment(serial) values(#{serial})")
    @Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id")
    int create(Payment payment);

    @Select("select id,serial from payment where id=#{id}")
    Payment getPaymentById(@Param("id") Long id);
}